package com.bluedot.www.core.common;


/**
 * @author He Peng
 * @version 1.0
 * @date 2021/8/21 19:16
 */
public class HandwritingRuntimeException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    /**
     * 结果码
     */
    private Integer code;


    public HandwritingRuntimeException(Integer code, String message) {
        super(message);
        this.code = code;
    }


    public HandwritingRuntimeException(ResultCodeEnum resultCode) {
        super(resultCode.getMessage());
        this.code = resultCode.getCode();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }


    @Override
    public String toString() {
        return "HandwritingRuntimeException{" +
                "code=" + code +
                ", msg='" + this.getMessage() + '\'' +
                '}';
    }
}
